package com.lgx.authorize.module.service;

import java.util.List;

import com.lgx.authorize.module.entity.ApplicationApplykeyInfo;
import com.lgx.authorize.module.entity.AuthorizeUserInfo;
import com.lgx.right.entity.User;

/**
 * this out service interface
 * @author pengdeyi (king)
 *
 */
public interface IAuthorizeUserInfoService {
	/**
	 * create a authorize user info
	 * @param authorizeUserInfo
	 */
	void createAuthorizeUserInfo(AuthorizeUserInfo authorizeUserInfo);
	/**
	 * upate the authorize user info
	 * @param authorizeUserInfo
	 */
	void updateAuthorizeUserInfo(AuthorizeUserInfo authorizeUserInfo);
	/**
	 * delete the authorize user info
	 * @param authorizeUserInfo
	 */
	void deleteAuthorizeUserInfo(AuthorizeUserInfo authorizeUserInfo);
	/**
	 * find the authorize user info
	 * @param systemid
	 * @return
	 */
	AuthorizeUserInfo findAuthorizeUserInfoById(int systemid);
	
	/**
	 * find the authorize user info by user 
	 * @param user
	 * @return
	 */
	AuthorizeUserInfo findAuthorizeUserInfoByUser(User user);
	/**
	 * list all authorize user infos
	 * @return
	 */
	List<AuthorizeUserInfo> listAllAuthorizeUserInfos();
	
	/**
	 * authorize user to this application
	 * @param user
	 * @param applicationApplykeyInfo
	 */
	AuthorizeUserInfo authorizeUserForApplication(User user,ApplicationApplykeyInfo applicationApplykeyInfo);
	
	/**
	 * list all authorize user from application apply key.
	 * @param applicationApplykeyInfo
	 * @return
	 */
	List<AuthorizeUserInfo> listAllAuthorizeUserInfosFromApplication(ApplicationApplykeyInfo applicationApplykeyInfo);
}
